//
//  RegisterStep1Controller.m
//  KuWeiPark
//
//  Created by Kevin Su on 15/4/28.
//  Copyright (c) 2015年 Clief. All rights reserved.
//

#import "RegisterStep1Controller.h"
#import "RegisterStep2Controller.h"

@interface RegisterStep1Controller ()<UITextFieldDelegate>

@end

@implementation RegisterStep1Controller

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.nextStepBtn.layer.masksToBounds = YES;
    self.nextStepBtn.layer.cornerRadius = 5;
    
    self.phoneTextField.delegate = self;
    self.vercodeTextField.delegate = self;
}

- (void)viewWillAppear:(BOOL)animated{
    
    [self.navigationController setNavigationBarHidden:NO animated:YES];
}

- (void)viewWillDisappear:(BOOL)animated{
    
    [self hideKeyBoard];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - IBAction
- (IBAction)sendVercodeAction:(id)sender {
    
    //获取验证码
}

- (IBAction)showNextStepViewAction:(id)sender {
    
    //下一步
    RegisterStep2Controller *registerStep2Controller = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"RegisterStep2Controller"];
    [self.navigationController pushViewController:registerStep2Controller animated:YES];
}

- (IBAction)back:(id)sender {
    
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - TextFieldDelegate
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
    
    [self hideKeyBoard];
    return YES;
}

- (void)hideKeyBoard{
    
    [self.phoneTextField resignFirstResponder];
    [self.vercodeTextField resignFirstResponder];
}

@end
